package 每日练习;

import java.util.Random;
import java.util.Scanner;

public class text14 {
    public static void main(String[] args) {
        Random r = new Random();
        int guess = r.nextInt(100) + 1;

        System.out.println("请输入你猜测的数字:");
        Scanner sc = new Scanner(System.in);
        while(true)
        {
            int guessnum = sc.nextInt();

            if(guessnum > guess)
                System.out.println("猜大了");
            else if(guessnum < guess)
                System.out.println("猜小了");
            else{
                System.out.println("猜对了");
            }
        }
    }
}
